// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 发起结对申请 POST /api/teacherPair/apply */
export async function applyForPairUsingPost(
  body: API.TeacherPairRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject_>("/api/teacherPair/apply", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 处理结对申请 POST /api/teacherPair/handle/${param0} */
export async function handleApplicationUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.handleApplicationUsingPOSTParams,
  options?: { [key: string]: any }
) {
  const { applicationId: param0, ...queryParams } = params;
  return request<API.BaseResponseObject_>(`/api/teacherPair/handle/${param0}`, {
    method: "POST",
    params: {
      ...queryParams,
    },
    ...(options || {}),
  });
}

/** 获取待处理的结对申请 GET /api/teacherPair/pending */
export async function getPendingApplicationsUsingGet(options?: {
  [key: string]: any;
}) {
  return request<API.BaseResponseListTeacherPairApplication_>(
    "/api/teacherPair/pending",
    {
      method: "GET",
      ...(options || {}),
    }
  );
}

/** 获取当前用户的结对关系 GET /api/teacherPair/relations */
export async function getTeacherRelationsUsingGet(options?: {
  [key: string]: any;
}) {
  return request<API.BaseResponseObject_>("/api/teacherPair/relations", {
    method: "GET",
    ...(options || {}),
  });
}

/** 解绑教师结对关系 POST /api/teacherPair/unbind/${param0} */
export async function unbindTeacherPairUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.unbindTeacherPairUsingPOSTParams,
  options?: { [key: string]: any }
) {
  const { relationId: param0, ...queryParams } = params;
  return request<API.BaseResponseObject_>(`/api/teacherPair/unbind/${param0}`, {
    method: "POST",
    params: { ...queryParams },
    ...(options || {}),
  });
}
